package pattern.proxy;

public class StarProxy implements Star{//代理对象 包含一个对目标对象的引用
    private RealStar realStar = new RealStar(); //真实明星！

    public void beforeSing(){
        System.out.println("经纪人在面谈，签合同，选场地，选歌曲，宣发，安排行程");
    }
    @Override
    public void sing() {
        this.beforeSing();
        realStar.sing();
        this.afterSing();
    }
    public void afterSing(){
        System.out.println("经纪人收尾款，赚钱啦");
    }

}
